import { button, buttonGroup } from './components/button'
import alter from './components/alert'
import card from './components/card'
import dialog from './components/dialog'
import divider from './components/divider'
import tooltip from './components/tooltip'
import dropdown from './components/dropdown'
import icon from './components/icon'
import message from './components/message'
import { tabs, tabContent } from './components/tabs'
import { row, col } from './components/grid'
import { breadcrumb, breadcrumbItem } from './components/breadcrumb'
import backtop from './components/backtop'
import select from './components/select'
import option from './components/select/src/option.vue'
import optionGroup from './components/select/src/optionGroup.vue'
import input from './components/input'
import tag from './components/tag'
import { timePicker, datePicker } from './components/dateTimePicker'
import empty from './components/empty'
const components = {
    button,
    buttonGroup,
    alter,
    card,
    tooltip,
    dropdown,
    dropdownMenu: dropdown.Menu,
    dropdownMain: dropdown.Main,
    icon,
    dialog,
    tabs,
    tabContent,
    row,
    col,
    breadcrumb,
    breadcrumbItem,
    backtop,
    select,
    option,
    optionGroup,
    input,
    tag,
    breadcrumb,
    breadcrumbItem,
    timePicker,
    datePicker,
    empty
}
const bfui = {
    ...components,
}
const install = (Vue) => {
    if (install.installed) return
    Object.keys(bfui).forEach((key) => {
        let keyName = 'bf-' + key
        Vue.component(keyName, bfui[key])
    })
    Vue.prototype.$message = message
}
if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue)
}
console.info('BF-Design Version:', process.env.VERSION)
const API = {
    version: process.env.VERSION,
    install,
    ...components,
}
export default API